import Taro, {Component} from '@tarojs/taro'
import {Image, Text, View} from '@tarojs/components'
import './bottomLoading.scss'


type Props = {
  list: Array<any>;
  totalPage:number;
  pageNo:number;
  isShowLookBtn:boolean;
  onGotoSimpleVote?:any;
  isHint?:any;
}


type PageState = {
  iconLookImage:string
}



class BottomLoading extends Component<Props, PageState> {

  constructor(props) {
    super(props);
    this.state={
      iconLookImage:require('../../common/assets/img/vote/icon_look@2x.png')
    }
  }

  static defaultProps = {
    list: [] ,       // 公告列表
  };


  gotoSimpleVote(){
    this.props.onGotoSimpleVote&&this.props.onGotoSimpleVote();
  }

  render() {
    let{ list,pageNo,totalPage,isShowLookBtn }=this.props
    let {iconLookImage} = this.state;
    console.log('pageNo===',pageNo,totalPage);
    return (
      <View>
        {list&&list.length > 0 && ((pageNo+1 >= totalPage)?
          <View className='no_more_content'>
           
            </View> :
          <View className='vote_loading_content'>
            <View className='vote_loading'></View>
            <Text>正在努力加载</Text>
          </View>)}
      </View>
    )
  }
}


export default BottomLoading
